package day04;
/**
 * 数组初始化的演示
 */
public class ArrayDemo2 {
    public static void main(String[] args) {
        //2.数组的初始化:
        int[] arr1 = new int[3]; //0,0,0
        int[] arr2 = {2,5,8}; //2,5,8
        int[] arr3 = new int[]{2,5,8}; //2,5,8
        int[] arr4;
        //arr4 = {2,5,8}; //编译错误，此方式只能声明同时初始化
        arr4 = new int[]{2,5,8}; //正确
    }
}












